//
// Created by 86138 on 2025/5/17.
//

#ifndef QINGDAO_UNIVERSITY_SQQUEUE_H
#define QINGDAO_UNIVERSITY_SQQUEUE_H
#include "../01-intro/c1-1.h"
#define MAX_QSIZE 6

typedef int QElemType;

struct SqQueue {
    QElemType *base;
    int front;
    int rear; // 指向队尾元素的下一个位置
};

void InitQueue(SqQueue &Q);

void DestroyQueue(SqQueue &Q);

bool QueueEmpty(SqQueue Q);

int QueueLength(SqQueue Q);

Status EnQueue(SqQueue &Q, QElemType e);

Status DeQueue(SqQueue &Q, QElemType &e);

Status GetHead(SqQueue Q, QElemType &e);
#endif //QINGDAO_UNIVERSITY_SQQUEUE_H
